3.5.62 \(\int \frac {\cosh (c+d x) \coth ^2(c+d x)}{a+b \sinh (c+d x)} \, dx\) [462]

Optimal. Leaf size=59 \[ -\frac {\text {csch}(c+d x)}{a d}-\frac {b \log (\sinh (c+d x))}{a^2 d}+\frac {\left (a^2+b^2\right ) \log (a+b \sinh (c+d x))}{a^2 b d} \]

[Out]

-csch(d*x+c)/a/d-b*ln(sinh(d*x+c))/a^2/d+(a^2+b^2)*ln(a+b*sinh(d*x+c))/a^2/b/d

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2916, 12, 908} \begin {gather*} \frac {\left (a^2+b^2\right ) \log (a+b \sinh (c+d x))}{a^2 b d}-\frac {b \log (\sinh (c+d x))}{a^2 d}-\frac {\text {csch}(c+d x)}{a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(Cosh[c + d*x]*Coth[c + d*x]^2)/(a + b*Sinh[c + d*x]),x]

[Out]

-(Csch[c + d*x]/(a*d)) - (b*Log[Sinh[c + d*x]])/(a^2*d) + ((a^2 + b^2)*Log[a + b*Sinh[c + d*x]])/(a^2*b*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 908

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && IntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 2916

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x
, b*Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {\cosh (c+d x) \coth ^2(c+d x)}{a+b \sinh (c+d x)} \, dx &=-\frac {\text {Subst}\left (\int \frac {b^2 \left (-b^2-x^2\right )}{x^2 (a+x)} \, dx,x,b \sinh (c+d x)\right )}{b^3 d}\\ &=-\frac {\text {Subst}\left (\int \frac {-b^2-x^2}{x^2 (a+x)} \, dx,x,b \sinh (c+d x)\right )}{b d}\\ &=-\frac {\text {Subst}\left (\int \left (-\frac {b^2}{a x^2}+\frac {b^2}{a^2 x}+\frac {-a^2-b^2}{a^2 (a+x)}\right ) \, dx,x,b \sinh (c+d x)\right )}{b d}\\ &=-\frac {\text {csch}(c+d x)}{a d}-\frac {b \log (\sinh (c+d x))}{a^2 d}+\frac {\left (a^2+b^2\right ) \log (a+b \sinh (c+d x))}{a^2 b d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 52, normalized size = 0.88 \begin {gather*} \frac {-a b \text {csch}(c+d x)-b^2 \log (\sinh (c+d x))+\left (a^2+b^2\right ) \log (a+b \sinh (c+d x))}{a^2 b d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(Cosh[c + d*x]*Coth[c + d*x]^2)/(a + b*Sinh[c + d*x]),x]

[Out]

(-(a*b*Csch[c + d*x]) - b^2*Log[Sinh[c + d*x]] + (a^2 + b^2)*Log[a + b*Sinh[c + d*x]])/(a^2*b*d)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(134\) vs. \(2(59)=118\).
time = 2.41, size = 135, normalized size = 2.29

method result size
risch \(-\frac {x}{b}-\frac {2 c}{b d}-\frac {2 \,{\mathrm e}^{d x +c}}{d a \left ({\mathrm e}^{2 d x +2 c}-1\right )}-\frac {b \ln \left ({\mathrm e}^{2 d x +2 c}-1\right )}{a^{2} d}+\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \,{\mathrm e}^{d x +c}}{b}-1\right )}{b d}+\frac {b \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \,{\mathrm e}^{d x +c}}{b}-1\right )}{a^{2} d}\) \(128\)
derivativedivides \(\frac {\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}-\frac {1}{2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {b \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2}}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b}+\frac {\left (2 a^{2}+2 b^{2}\right ) \ln \left (a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{2 a^{2} b}}{d}\) \(135\)
default \(\frac {\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}-\frac {1}{2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {b \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2}}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b}+\frac {\left (2 a^{2}+2 b^{2}\right ) \ln \left (a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{2 a^{2} b}}{d}\) \(135\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(d*x+c)*coth(d*x+c)^2/(a+b*sinh(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/2/a*tanh(1/2*d*x+1/2*c)-1/2/a/tanh(1/2*d*x+1/2*c)-1/a^2*b*ln(tanh(1/2*d*x+1/2*c))-1/b*ln(tanh(1/2*d*x+1
/2*c)+1)-1/b*ln(tanh(1/2*d*x+1/2*c)-1)+1/2/a^2/b*(2*a^2+2*b^2)*ln(a*tanh(1/2*d*x+1/2*c)^2-2*b*tanh(1/2*d*x+1/2
*c)-a))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 131 vs. \(2 (59) = 118\).
time = 0.27, size = 131, normalized size = 2.22 \begin {gather*} \frac {d x + c}{b d} + \frac {2 \, e^{\left (-d x - c\right )}}{{\left (a e^{\left (-2 \, d x - 2 \, c\right )} - a\right )} d} - \frac {b \log \left (e^{\left (-d x - c\right )} + 1\right )}{a^{2} d} - \frac {b \log \left (e^{\left (-d x - c\right )} - 1\right )}{a^{2} d} + \frac {{\left (a^{2} + b^{2}\right )} \log \left (-2 \, a e^{\left (-d x - c\right )} + b e^{\left (-2 \, d x - 2 \, c\right )} - b\right )}{a^{2} b d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)*coth(d*x+c)^2/(a+b*sinh(d*x+c)),x, algorithm="maxima")

[Out]

(d*x + c)/(b*d) + 2*e^(-d*x - c)/((a*e^(-2*d*x - 2*c) - a)*d) - b*log(e^(-d*x - c) + 1)/(a^2*d) - b*log(e^(-d*
x - c) - 1)/(a^2*d) + (a^2 + b^2)*log(-2*a*e^(-d*x - c) + b*e^(-2*d*x - 2*c) - b)/(a^2*b*d)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 299 vs. \(2 (59) = 118\).
time = 0.39, size = 299, normalized size = 5.07 \begin {gather*} -\frac {a^{2} d x \cosh \left (d x + c\right )^{2} + a^{2} d x \sinh \left (d x + c\right )^{2} - a^{2} d x + 2 \, a b \cosh \left (d x + c\right ) - {\left ({\left (a^{2} + b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{2} + b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{2} + b^{2}\right )} \sinh \left (d x + c\right )^{2} - a^{2} - b^{2}\right )} \log \left (\frac {2 \, {\left (b \sinh \left (d x + c\right ) + a\right )}}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) + {\left (b^{2} \cosh \left (d x + c\right )^{2} + 2 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b^{2} \sinh \left (d x + c\right )^{2} - b^{2}\right )} \log \left (\frac {2 \, \sinh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) + 2 \, {\left (a^{2} d x \cosh \left (d x + c\right ) + a b\right )} \sinh \left (d x + c\right )}{a^{2} b d \cosh \left (d x + c\right )^{2} + 2 \, a^{2} b d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a^{2} b d \sinh \left (d x + c\right )^{2} - a^{2} b d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)*coth(d*x+c)^2/(a+b*sinh(d*x+c)),x, algorithm="fricas")

[Out]

-(a^2*d*x*cosh(d*x + c)^2 + a^2*d*x*sinh(d*x + c)^2 - a^2*d*x + 2*a*b*cosh(d*x + c) - ((a^2 + b^2)*cosh(d*x +
c)^2 + 2*(a^2 + b^2)*cosh(d*x + c)*sinh(d*x + c) + (a^2 + b^2)*sinh(d*x + c)^2 - a^2 - b^2)*log(2*(b*sinh(d*x
+ c) + a)/(cosh(d*x + c) - sinh(d*x + c))) + (b^2*cosh(d*x + c)^2 + 2*b^2*cosh(d*x + c)*sinh(d*x + c) + b^2*si
nh(d*x + c)^2 - b^2)*log(2*sinh(d*x + c)/(cosh(d*x + c) - sinh(d*x + c))) + 2*(a^2*d*x*cosh(d*x + c) + a*b)*si
nh(d*x + c))/(a^2*b*d*cosh(d*x + c)^2 + 2*a^2*b*d*cosh(d*x + c)*sinh(d*x + c) + a^2*b*d*sinh(d*x + c)^2 - a^2*
b*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cosh {\left (c + d x \right )} \coth ^{2}{\left (c + d x \right )}}{a + b \sinh {\left (c + d x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)*coth(d*x+c)**2/(a+b*sinh(d*x+c)),x)

[Out]

Integral(cosh(c + d*x)*coth(c + d*x)**2/(a + b*sinh(c + d*x)), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 121 vs. \(2 (59) = 118\).
time = 0.45, size = 121, normalized size = 2.05 \begin {gather*} -\frac {\frac {b \log \left ({\left | e^{\left (d x + c\right )} - e^{\left (-d x - c\right )} \right |}\right )}{a^{2}} - \frac {{\left (a^{2} + b^{2}\right )} \log \left ({\left | b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} + 2 \, a \right |}\right )}{a^{2} b} - \frac {b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} - 2 \, a}{a^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)*coth(d*x+c)^2/(a+b*sinh(d*x+c)),x, algorithm="giac")

[Out]

-(b*log(abs(e^(d*x + c) - e^(-d*x - c)))/a^2 - (a^2 + b^2)*log(abs(b*(e^(d*x + c) - e^(-d*x - c)) + 2*a))/(a^2
*b) - (b*(e^(d*x + c) - e^(-d*x - c)) - 2*a)/(a^2*(e^(d*x + c) - e^(-d*x - c))))/d

________________________________________________________________________________________

Mupad [B]
time = 0.47, size = 356, normalized size = 6.03 \begin {gather*} \frac {2\,{\mathrm {e}}^{c+d\,x}}{a\,d-a\,d\,{\mathrm {e}}^{2\,c+2\,d\,x}}-\frac {x}{b}+\frac {\ln \left (8\,a^5\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c-16\,b^5-16\,a^2\,b^3-4\,a^4\,b+16\,b^5\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+4\,a^4\,b\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+32\,a^3\,b^2\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c+16\,a^2\,b^3\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+32\,a\,b^4\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\right )}{b\,d}+\frac {b\,\ln \left (8\,a^5\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c-16\,b^5-16\,a^2\,b^3-4\,a^4\,b+16\,b^5\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+4\,a^4\,b\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+32\,a^3\,b^2\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c+16\,a^2\,b^3\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+32\,a\,b^4\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\right )}{a^2\,d}-\frac {b\,\ln \left (4\,a^6+16\,b^6+32\,a^2\,b^4+20\,a^4\,b^2-4\,a^6\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}-16\,b^6\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}-32\,a^2\,b^4\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}-20\,a^4\,b^2\,{\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}\right )}{a^2\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cosh(c + d*x)*coth(c + d*x)^2)/(a + b*sinh(c + d*x)),x)

[Out]

(2*exp(c + d*x))/(a*d - a*d*exp(2*c + 2*d*x)) - x/b + log(8*a^5*exp(d*x)*exp(c) - 16*b^5 - 16*a^2*b^3 - 4*a^4*
b + 16*b^5*exp(2*c)*exp(2*d*x) + 4*a^4*b*exp(2*c)*exp(2*d*x) + 32*a^3*b^2*exp(d*x)*exp(c) + 16*a^2*b^3*exp(2*c
)*exp(2*d*x) + 32*a*b^4*exp(d*x)*exp(c))/(b*d) + (b*log(8*a^5*exp(d*x)*exp(c) - 16*b^5 - 16*a^2*b^3 - 4*a^4*b
+ 16*b^5*exp(2*c)*exp(2*d*x) + 4*a^4*b*exp(2*c)*exp(2*d*x) + 32*a^3*b^2*exp(d*x)*exp(c) + 16*a^2*b^3*exp(2*c)*
exp(2*d*x) + 32*a*b^4*exp(d*x)*exp(c)))/(a^2*d) - (b*log(4*a^6 + 16*b^6 + 32*a^2*b^4 + 20*a^4*b^2 - 4*a^6*exp(
2*c)*exp(2*d*x) - 16*b^6*exp(2*c)*exp(2*d*x) - 32*a^2*b^4*exp(2*c)*exp(2*d*x) - 20*a^4*b^2*exp(2*c)*exp(2*d*x)
))/(a^2*d)

________________________________________________________________________________________